import request from '@/utils/request'

// 查询参数定义列表
export function listParam(query) {
    return request({
        url: '/base/param/list',
        method: 'get',
        params: query
    })
}

// 查询参数定义详细
export function getParam(paramId) {
    return request({
        url: '/base/param/' + paramId,
        method: 'get'
    })
}

// 新增参数定义
export function addParam(data) {
    return request({
        url: '/base/param',
        method: 'post',
        data: data
    })
}

// 修改参数定义
export function updateParam(data) {
    return request({
        url: '/base/param',
        method: 'put',
        data: data
    })
}

// 删除参数定义
export function delParam(paramId) {
    return request({
        url: '/base/param/' + paramId,
        method: 'delete'
    })
}
// 分类API*************
// 查询参数定义分类列表
export function listCategory(query) {
  return request({
      url: '/base/paramCategory/list',
      method: 'get',
      params: query
  })
}

// 查询参数定义分类详细
export function getCategory(paramCategoryId) {
  return request({
      url: '/base/paramCategory/' + paramCategoryId,
      method: 'get'
  })
}

// 新增参数定义分类
export function addCategory(data) {
  return request({
      url: '/base/paramCategory',
      method: 'post',
      data: data
  })
}

// 修改参数定义分类
export function updateCategory(data) {
  return request({
      url: '/base/paramCategory',
      method: 'put',
      data: data
  })
}

// 删除参数定义分类
export function delCategory(paramCategoryId) {
  return request({
      url: '/base/paramCategory/' + paramCategoryId,
      method: 'delete'
  })
}
// 获取计量单位下拉数据
export function getDataTypeOption() {
    return request({
        url: '/base/dataType/dropList',
        method: 'get'
    })
  }
